package com.cntcdt.api.db.model.base;

import java.io.Serializable;
import java.sql.ResultSet;
import java.util.Date;

/**
 * 这是device_move_apply的数据传输对象基类,直接与表对应<br>
 */
public abstract class DeviceMoveApplyModelBase  implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 属性:id<br>
     */
    private Integer id = 0;
    /**
     * 属性:terminal<br>
     */
    private String terminal = "";
    /**
     * 属性:address<br>
     */
    private String address = "";
    /**
     * 属性:name<br>
     */
    private String name = "";
    /**
     * 属性:serveTime<br>
     */
    private String serveTime = "";
    /**
     * 属性:profit<br>
     */
    private String profit = "";
    /**
     * 属性:divide<br>
     */
    private String divide = "";
    /**
     * 属性:company<br>
     */
    private String company = "";
    /**
     * 属性:moveTime<br>
     */
    private Date moveTime = new Date();
    /**
     * 属性:city<br>
     */
    private String city = "";
    /**
     * 属性:comment<br>
     */
    private String comment = "";
    /**
     * 属性:logo<br>
     */
    private String logo = "";
    /**
     * 属性:shopPic1<br>
     */
    private String shopPic1 = "";
    /**
     * 属性:shopPic2<br>
     */
    private String shopPic2 = "";
    /**
     * 属性:addTime<br>
     */
    private Date addTime = new Date();
    /**
     * 属性:updateTime<br>
     */
    private Date updateTime = new Date();
    /**
     * 属性:isDispose<br>
     */
    private Integer isDispose = 0;
    /**
     * 属性:1：上线 2：下线 3：转移 4：更新<br>
     * 含义:1：上线 2：下线 3：转移 4：更新<br>
     */
    private Integer type = 0;
    
    private Integer userId = 0;

    /**
     *  默认构造方法,构造一个默认的DeviceMoveApplyModelBase对象
     */
    public DeviceMoveApplyModelBase(){
    }

    /**
     *  构造函数
     *  @param rs 数据库查询结果集
     */
    public DeviceMoveApplyModelBase(ResultSet rs){
           try{
               this.id = rs.getInt("id");
               this.terminal = rs.getString("terminal");
               this.address = rs.getString("address");
               this.name = rs.getString("name");
               this.serveTime = rs.getString("serveTime");
               this.profit = rs.getString("profit");
               this.divide = rs.getString("divide");
               this.company = rs.getString("company");
               this.moveTime = rs.getDate("moveTime");
               this.city = rs.getString("city");
               this.comment = rs.getString("comment");
               this.logo = rs.getString("logo");
               this.shopPic1 = rs.getString("shopPic1");
               this.shopPic2 = rs.getString("shopPic2");
               this.addTime = rs.getDate("addTime");
               this.updateTime = rs.getDate("updateTime");
               this.isDispose = rs.getInt("isDispose");
               this.type = rs.getInt("type");
               this.userId = rs.getInt("userId");
           }catch(Exception e) {
              e.printStackTrace(); 
           }
    }


    public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	/**
     * 设置属性id<br>
     * @param id 待设置的属性id的值
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取属性id<br>
     * @return 属性id的值
     */
    public Integer getId() {
        return id;
    }

    /**
     * 设置属性terminal<br>
     * @param terminal 待设置的属性terminal的值
     */
    public void setTerminal(String terminal) {
        this.terminal = terminal;
    }

    /**
     * 获取属性terminal<br>
     * @return 属性terminal的值
     */
    public String getTerminal() {
        return terminal;
    }

    /**
     * 设置属性address<br>
     * @param address 待设置的属性address的值
     */
    public void setAddress(String address) {
        this.address = address;
    }

    /**
     * 获取属性address<br>
     * @return 属性address的值
     */
    public String getAddress() {
        return address;
    }

    /**
     * 设置属性name<br>
     * @param name 待设置的属性name的值
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取属性name<br>
     * @return 属性name的值
     */
    public String getName() {
        return name;
    }

    /**
     * 设置属性serveTime<br>
     * @param serveTime 待设置的属性serveTime的值
     */
    public void setServeTime(String serveTime) {
        this.serveTime = serveTime;
    }

    /**
     * 获取属性serveTime<br>
     * @return 属性serveTime的值
     */
    public String getServeTime() {
        return serveTime;
    }

    /**
     * 设置属性profit<br>
     * @param profit 待设置的属性profit的值
     */
    public void setProfit(String profit) {
        this.profit = profit;
    }

    /**
     * 获取属性profit<br>
     * @return 属性profit的值
     */
    public String getProfit() {
        return profit;
    }

    /**
     * 设置属性divide<br>
     * @param divide 待设置的属性divide的值
     */
    public void setDivide(String divide) {
        this.divide = divide;
    }

    /**
     * 获取属性divide<br>
     * @return 属性divide的值
     */
    public String getDivide() {
        return divide;
    }

    /**
     * 设置属性company<br>
     * @param company 待设置的属性company的值
     */
    public void setCompany(String company) {
        this.company = company;
    }

    /**
     * 获取属性company<br>
     * @return 属性company的值
     */
    public String getCompany() {
        return company;
    }

    /**
     * 设置属性moveTime<br>
     * @param moveTime 待设置的属性moveTime的值
     */
    public void setMoveTime(Date moveTime) {
        this.moveTime = moveTime;
    }

    /**
     * 获取属性moveTime<br>
     * @return 属性moveTime的值
     */
    public Date getMoveTime() {
        return moveTime;
    }

    /**
     * 设置属性city<br>
     * @param city 待设置的属性city的值
     */
    public void setCity(String city) {
        this.city = city;
    }

    /**
     * 获取属性city<br>
     * @return 属性city的值
     */
    public String getCity() {
        return city;
    }

    /**
     * 设置属性comment<br>
     * @param comment 待设置的属性comment的值
     */
    public void setComment(String comment) {
        this.comment = comment;
    }

    /**
     * 获取属性comment<br>
     * @return 属性comment的值
     */
    public String getComment() {
        return comment;
    }

    /**
     * 设置属性logo<br>
     * @param logo 待设置的属性logo的值
     */
    public void setLogo(String logo) {
        this.logo = logo;
    }

    /**
     * 获取属性logo<br>
     * @return 属性logo的值
     */
    public String getLogo() {
        return logo;
    }

    /**
     * 设置属性shopPic1<br>
     * @param shopPic1 待设置的属性shopPic1的值
     */
    public void setShopPic1(String shopPic1) {
        this.shopPic1 = shopPic1;
    }

    /**
     * 获取属性shopPic1<br>
     * @return 属性shopPic1的值
     */
    public String getShopPic1() {
        return shopPic1;
    }

    /**
     * 设置属性shopPic2<br>
     * @param shopPic2 待设置的属性shopPic2的值
     */
    public void setShopPic2(String shopPic2) {
        this.shopPic2 = shopPic2;
    }

    /**
     * 获取属性shopPic2<br>
     * @return 属性shopPic2的值
     */
    public String getShopPic2() {
        return shopPic2;
    }

    /**
     * 设置属性addTime<br>
     * @param addTime 待设置的属性addTime的值
     */
    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    /**
     * 获取属性addTime<br>
     * @return 属性addTime的值
     */
    public Date getAddTime() {
        return addTime;
    }

    /**
     * 设置属性updateTime<br>
     * @param updateTime 待设置的属性updateTime的值
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 获取属性updateTime<br>
     * @return 属性updateTime的值
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 设置属性isDispose<br>
     * @param isDispose 待设置的属性isDispose的值
     */
    public void setIsDispose(Integer isDispose) {
        this.isDispose = isDispose;
    }

    /**
     * 获取属性isDispose<br>
     * @return 属性isDispose的值
     */
    public Integer getIsDispose() {
        return isDispose;
    }

    /**
     * 设置属性1：上线 2：下线 3：转移 4：更新<br>
     * 含义:1：上线 2：下线 3：转移 4：更新<br>
     * @param type 待设置的属性1：上线 2：下线 3：转移 4：更新的值
     */
    public void setType(Integer type) {
        this.type = type;
    }

    /**
     * 获取属性1：上线 2：下线 3：转移 4：更新<br>
     * 含义:1：上线 2：下线 3：转移 4：更新<br>
     * @return 属性1：上线 2：下线 3：转移 4：更新的值
     */
    public Integer getType() {
        return type;
    }


    /**
     * 比较两个对象在逻辑上是否相等
     * @see java.lang.Object#equals(java.lang.Object)
     */
    public boolean equals(Object other) {
        if (this == other) {
            return true;
        }
        if (!(other instanceof DeviceMoveApplyModelBase)) {
            return false;
        }

        final DeviceMoveApplyModelBase otherModel = (DeviceMoveApplyModelBase) other;
        if (getId()!=null && !getId().equals(otherModel.getId())) {
            return false;
        }
        return true;
    }

    /**
     * 根据主键生成HashCode
     * @see java.lang.Object#hashCode()
     */
    public int hashCode() {
        StringBuffer buffer = new StringBuffer();
        buffer.append('|').append(id);
        return buffer.toString().hashCode();
    }
}
